﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mevsukovGames
{
    public abstract class InputHandlerBase
    {
        public event EventHandler MoveLeft;
        public event EventHandler MoveRight;
        public event EventHandler Rotate;
        public event EventHandler MoveDown;
        public event EventHandler MoveUp;

        public abstract void QueryKeyBoard();


        protected virtual void OnMoveDown()
        {
            if (this.MoveDown != null)
                this.MoveDown(this, EventArgs.Empty);
        }

        protected virtual void OnMoveLeft()
        {
            if (this.MoveLeft != null)
                this.MoveLeft(this, EventArgs.Empty);
        }

        protected virtual void OnMoveRight()
        {
            if (this.MoveRight != null)
                this.MoveRight(this, EventArgs.Empty);
        }

        protected virtual void OnMoveUp()
        {
            if (this.MoveUp != null)
                this.MoveUp(this, EventArgs.Empty);
        }

        protected virtual void OnRotate()
        {
            if (this.Rotate != null)
                this.Rotate(this, EventArgs.Empty);
        }

    }
}
